package com.yxhl.zoume.data.http.rest.repositoryimpl;

import com.yxhl.zoume.data.http.repository.coupon.CouponRepository;
import com.yxhl.zoume.data.http.rest.param.busticket.PerfectCouponParam;
import com.yxhl.zoume.data.http.rest.param.coupon.CouponSelectParam;
import com.yxhl.zoume.data.http.rest.param.coupon.CurrentCouponParam;
import com.yxhl.zoume.data.http.rest.param.coupon.HistoryCouponParam;
import com.yxhl.zoume.data.http.rest.repositoryimpl.base.BaseDataRepository;
import com.yxhl.zoume.data.http.rest.response.coupon.CouponSelectResponse;
import com.yxhl.zoume.data.http.rest.response.coupon.CurrentCouponResponse;
import com.yxhl.zoume.data.http.rest.response.coupon.HistoryCouponResponse;
import com.yxhl.zoume.data.http.rest.response.coupon.PerfectCouponResponse;

import javax.inject.Inject;

import retrofit2.http.Body;
import rx.Observable;

/**
 * Created by vhawk on 2016/11/3.
 */
public class CouponDataRepository extends BaseDataRepository implements CouponRepository {

    @Inject
    public CouponDataRepository() {
    }

    @Override
    public Observable<CurrentCouponResponse> fetchCurrentCoupons(CurrentCouponParam param) {
        return mZouMeService.fetchCurrentCoupons(param);
    }

    @Override
    public Observable<HistoryCouponResponse> fetchHistoryCoupons(HistoryCouponParam param) {
        return mZouMeService.fetchHistoryCoupons(param);
    }

    @Override
    public Observable<CouponSelectResponse> fetchUsefulCoupons(CouponSelectParam param) {
        return mZouMeService.fetchUsefulCoupons(param);
    }

    @Override
    public Observable<PerfectCouponResponse> queryPerfectCoupon(@Body PerfectCouponParam param) {
        return mZouMeService.queryPerfectCoupon(param);
    }
}
